﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace WordRacer.Domain.Tests.Unit.Boards
{
  public static class BoardFixture
  {
    /// <summary>
    /// Asserts Path Count
    /// </summary>
    /// <param name="paths">list of paths (not necessarily words)</param>
    /// <param name="pathCount">how many paths that should have been present</param>
    internal static void AssertPathCount(IList<string> paths, int pathCount)
    {
      Assert.AreEqual(paths.Count, pathCount);
    }

    internal static void AssertWordInPaths(IList<string> paths, string wordToFind)
    {
      Assert.IsTrue(paths.Contains(wordToFind));
    }

    internal static void AssertPathNotFound(IList<string> paths, string wordToFind)
    {
      Assert.IsFalse(paths.Contains(wordToFind));
    }

    internal static void AssertWordFound(IList<string> wordsFromBoard, string wordToFind)
    {
      Assert.IsTrue(wordsFromBoard.Contains(wordToFind));
    }

    internal static void AssertWordNotFound(IList<string> foundWords, string wordToFind)
    {
      Assert.IsFalse(foundWords.Contains(wordToFind));
    }

    internal static void AssertFoundWordCount(IList<string> foundWords, int wordCountExpected)
    {
      Assert.IsTrue(foundWords.Count == wordCountExpected);
    }

  }
}
